OBJS_API =  api001.obj api002.obj api003.obj api004.obj api005.obj api006.obj \
			api007.obj api008.obj api009.obj api010.obj api011.obj api012.obj \
			api013.obj api014.obj api015.obj api016.obj api017.obj api018.obj \
			api019.obj api020.obj api021.obj api022.obj api023.obj api024.obj \
			api025.obj api026.obj \
			alloca.obj

TOOLPATH = ../../z_tools/
INCPATH = ../../z_tools/haribote/

MAKE	 = $(TOOLPATH)make.exe -r
NASK 	 = $(TOOLPATH)nask.exe
CC1 	 = $(TOOLPATH)cc1.exe -I$(INCPATH) -Os -Wall -quiet -std=c99
GAS2NASK = $(TOOLPATH)gas2nask.exe -a
OBJ2BIM  = $(TOOLPATH)obj2bim.exe
MAKEFONT = $(TOOLPATH)makefont.exe
BIN2OBJ	 = $(TOOLPATH)bin2obj.exe
BIM2HRB  = $(TOOLPATH)bim2hrb.exe
RULEFILE = ../haribote.rul
EDIMG	 = $(TOOLPATH)edimg.exe
IMGTOL 	 = $(TOOLPATH)imgtol.com
GOLIB	 = $(TOOLPATH)golib00.exe
COPY 	 = copy
DEL		 = del

# 默认操作

default :
	$(MAKE) apilib.lib

# 生成规则

apilib.lib : $(OBJS_API) Makefile
	$(GOLIB) $(OBJS_API) out:apilib.lib

%.obj : %.nas Makefile
	$(NASK) $*.nas $*.obj $*.lst

# 伪目标

.PHONY : clean src_only

clean :
	-$(DEL) *.lst
	-$(DEL) *.obj

src_only :
	$(MAKE) clean
	-$(DEL) apilib.lib
